//
//  OrderListCell.m
//  PPDL
//
//  Created by 王洋 on 2019/7/24.
//  Copyright © 2019 王洋. All rights reserved.
//

#import "OrderListCell.h"

@interface OrderListCell ()

@property (weak, nonatomic) IBOutlet UIImageView *itemMainImage;

@property (weak, nonatomic) IBOutlet UILabel *itemGoodName;
@property (weak, nonatomic) IBOutlet UILabel *itemGoodPrice;
@property (weak, nonatomic) IBOutlet UILabel *itemFreight;

@end

@implementation OrderListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)fillCellWithModel:(OrderListModel *)model {
    
    [self.itemMainImage sd_setImageWithURL:[NSURL URLWithString:model.itemGoodsImage] placeholderImage:[UIImage imageNamed:@"placeholder_rect"] options:SDWebImageRetryFailed];
    
    self.itemGoodName.text = [NSString stringWithFormat:@"%@",model.itemGoodsName];
    self.itemGoodPrice.text = [NSString stringWithFormat:@"¥ %@",[Utilities changeDoubleToString:model.itemGoodsDealPrice]];
    self.itemFreight.text = [NSString stringWithFormat:@"运费：¥ %@",[Utilities changeDoubleToString:model.itemGoodsFreight]];
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [self.itemMainImage pp_clipCorners:UIRectCornerAllCorners radius:5];
    
}
@end
